package com.cgwx.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.time.format.DateTimeFormatter;
import com.baomidou.mybatisplus.annotations.TableName;
import com.cgwx.auth.util.TreeUtil.TreeNode;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("fs_folder")
@ApiModel(value="folder对象", description="")
@Getter
@Setter
public class Folder extends TreeNode implements Serializable {

    private static final DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    private static final long serialVersionUID = 1L;

    private String entityId;

    private String entityName;

    private String entityRoom;

    private String ownerAccount;

    private String ownerName;

    private String parentId;

    private String type;

    private String tag;

    private String isDeleted;

    private String isOuter;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Timestamp createTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Timestamp updateTime;

    @Override
    public String toString() {
        return "Folder{" +
                "entityId='" + entityId + '\'' +
                ", entityName='" + entityName + '\'' +
                ", entityRoom='" + entityRoom + '\'' +
                ", ownerAccount='" + ownerAccount + '\'' +
                ", ownerName='" + ownerName + '\'' +
                ", parentId='" + parentId + '\'' +
                ", type='" + type + '\'' +
                ", tag='" + tag + '\'' +
                ", isDeleted='" + isDeleted + '\'' +
                ", isOuter='" + isOuter + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }

    @Override
    public String getPid() {
        return parentId;
    }

    @Override
    public String getUuid() {
        return entityId;
    }

}
